package com.hs.rabbitmqdemo.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @ClassName DriudConfig
 * @Description TODO
 * @Author 郭敖
 * @Date 2023年09月25日 21:52
 * @Version 1.0
 */
@Configuration
public class DriudConfig {

    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DataSource getDataSource(){
        return new DruidDataSource();
    };
}
